/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.*;
import DTO.*;
import java.awt.Desktop;
import java.util.List;
import java.util.ArrayList;
import java.util.regex.*;

import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

import java.awt.event.*;
import java.io.File;
import java.io.IOException;
import java.sql.*;



import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.print.*;
import java.nio.channels.SelectionKey;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;


import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JFrame;
import javax.swing.JTable.PrintMode;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.swing.JRViewer;


public class AprobacionAlzamientoGarantia extends javax.swing.JFrame{
    
    usuarioDTO user;
    garantiasDAO reg = new garantiasDAO();
    garantiaHipotecariaDTO casa =  new garantiaHipotecariaDTO();
    garantiaAutomotrizDTO auto = new garantiaAutomotrizDTO();
    garantiaWarrantsDTO warra = new garantiaWarrantsDTO();
    garantiaCdpOtrosDTO cdp =  new garantiaCdpOtrosDTO();
    
    //private PageFormat mPageFormat;
    
    public AprobacionAlzamientoGarantia(usuarioDTO user) {
        this.user = user;
        initComponents();
        pnlAuto.setVisible(false);
        pnlCDP.setVisible(false);
        pnlHipo.setVisible(false);
        pnlWarra.setVisible(false);
        this.rbtRolSii.setSelected(true);
        btnAprobacionFinalAprAlzamiento.setVisible(false);
        btnRechazarAprobAlzamiento.setVisible(false);
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        lblLogo = new javax.swing.JLabel();
        lblIngresoGaraAuto = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel10 = new javax.swing.JPanel();
        pnlHipo = new javax.swing.JPanel();
        txtSIIAprobacionAlzamiento = new javax.swing.JTextField();
        btnBuscarSIIAprobAlzamiento = new javax.swing.JButton();
        chkHipAprobAlzamiento = new javax.swing.JCheckBox();
        pnlAuto = new javax.swing.JPanel();
        txtPatenteAprobacionAlzamiento = new javax.swing.JTextField();
        btnBuscarPatenteAprobAlzamiento = new javax.swing.JButton();
        chkAutoAprobacionAlzamiento = new javax.swing.JCheckBox();
        chkWarrantAprobacionAlzamiento = new javax.swing.JCheckBox();
        pnlWarra = new javax.swing.JPanel();
        txtDUNAprobacionAlzamiento = new javax.swing.JTextField();
        btnBuscarDUNAprobarAlzamiento = new javax.swing.JButton();
        pnlCDP = new javax.swing.JPanel();
        txtNumeroAprobacionAlzamiento = new javax.swing.JTextField();
        btnBuscarNumeroAprobacionAlzamiento = new javax.swing.JButton();
        chkCDPAprobacionAlzamiento = new javax.swing.JCheckBox();
        pnlDatosPersoGara1 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        txtNombreGarAprobarAlzamiento = new javax.swing.JTextField();
        txtApellMateGarAprobacionAlzamiento = new javax.swing.JTextField();
        txtApellPatAprobacionAlzamiento = new javax.swing.JTextField();
        txtRutGarAprobAlzamiento = new javax.swing.JTextField();
        btnMenuAprobacionAlzamiento = new javax.swing.JButton();
        jPanel12 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        pnlDescripGarantia = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        txtOtroComentario = new javax.swing.JTextArea();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtDescripcionAprobacionAlzamiento = new javax.swing.JTextArea();
        lblDescripcion = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtFechUltTasacionAprobAlzamiento = new javax.swing.JTextField();
        txtFechExtAprobacionAlzamiento = new javax.swing.JTextField();
        txtMonedaAprobAlzamiento = new javax.swing.JTextField();
        txtTipoGtiaAprobacionAlzamiento = new javax.swing.JTextField();
        txtSucursalAprobacionAlzamiento = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        txtIdentificacionGrarantia = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jPanel14 = new javax.swing.JPanel();
        pnlDescripGarantia1 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        txtComentarioAprob = new javax.swing.JTextArea();
        btnMenu2AprobAlzamiento = new javax.swing.JButton();
        btnAprobacionFinalAprAlzamiento = new javax.swing.JButton();
        btnRechazarAprobAlzamiento = new javax.swing.JButton();
        lblEstado = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbSalidaImprimirID = new javax.swing.JTable();
        jPanel4 = new javax.swing.JPanel();
        btnBuscrIDImprimir = new javax.swing.JButton();
        txtBuscarIDImprimir = new javax.swing.JTextField();
        btnImprimirID = new javax.swing.JButton();
        btnMenuPrincipalID = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        rbtRolSii = new javax.swing.JRadioButton();
        rbtPatente = new javax.swing.JRadioButton();
        rbtDun = new javax.swing.JRadioButton();
        rbtNumeroCdp = new javax.swing.JRadioButton();
        btnExportarAprobAlzamGtia = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("APROBACIÓN ALZAMIENTO GARANTÍA");
        setResizable(false);

        lblLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        lblIngresoGaraAuto.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        lblIngresoGaraAuto.setText("APROBACIÓN ALZAMIENTO GARANTÍA");

        jTabbedPane1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N

        pnlHipo.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE ROL SII", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtSIIAprobacionAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtSIIAprobacionAlzamientoActionPerformed(evt);
            }
        });

        btnBuscarSIIAprobAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarSIIAprobAlzamiento.setText("BUSCAR");
        btnBuscarSIIAprobAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarSIIAprobAlzamientoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlHipoLayout = new javax.swing.GroupLayout(pnlHipo);
        pnlHipo.setLayout(pnlHipoLayout);
        pnlHipoLayout.setHorizontalGroup(
            pnlHipoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHipoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlHipoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtSIIAprobacionAlzamiento)
                    .addComponent(btnBuscarSIIAprobAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlHipoLayout.setVerticalGroup(
            pnlHipoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHipoLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtSIIAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarSIIAprobAlzamiento))
        );

        buttonGroup1.add(chkHipAprobAlzamiento);
        chkHipAprobAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkHipAprobAlzamiento.setText("HIPOTECARIA");
        chkHipAprobAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkHipAprobAlzamientoActionPerformed(evt);
            }
        });

        pnlAuto.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE PATENTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarPatenteAprobAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarPatenteAprobAlzamiento.setText("BUSCAR");
        btnBuscarPatenteAprobAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarPatenteAprobAlzamientoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlAutoLayout = new javax.swing.GroupLayout(pnlAuto);
        pnlAuto.setLayout(pnlAutoLayout);
        pnlAutoLayout.setHorizontalGroup(
            pnlAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAutoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtPatenteAprobacionAlzamiento)
                    .addComponent(btnBuscarPatenteAprobAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlAutoLayout.setVerticalGroup(
            pnlAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAutoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtPatenteAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarPatenteAprobAlzamiento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        buttonGroup1.add(chkAutoAprobacionAlzamiento);
        chkAutoAprobacionAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkAutoAprobacionAlzamiento.setText("AUTOMOTRIZ");
        chkAutoAprobacionAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkAutoAprobacionAlzamientoActionPerformed(evt);
            }
        });

        buttonGroup1.add(chkWarrantAprobacionAlzamiento);
        chkWarrantAprobacionAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkWarrantAprobacionAlzamiento.setText("WARRANT");
        chkWarrantAprobacionAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkWarrantAprobacionAlzamientoActionPerformed(evt);
            }
        });

        pnlWarra.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE CÓDIGO ÚNICO (D.U.N 14)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtDUNAprobacionAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtDUNAprobacionAlzamientoActionPerformed(evt);
            }
        });

        btnBuscarDUNAprobarAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarDUNAprobarAlzamiento.setText("BUSCAR");
        btnBuscarDUNAprobarAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarDUNAprobarAlzamientoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlWarraLayout = new javax.swing.GroupLayout(pnlWarra);
        pnlWarra.setLayout(pnlWarraLayout);
        pnlWarraLayout.setHorizontalGroup(
            pnlWarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlWarraLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlWarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtDUNAprobacionAlzamiento)
                    .addComponent(btnBuscarDUNAprobarAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(67, Short.MAX_VALUE))
        );
        pnlWarraLayout.setVerticalGroup(
            pnlWarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlWarraLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtDUNAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarDUNAprobarAlzamiento))
        );

        pnlCDP.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE NÚMERO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtNumeroAprobacionAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtNumeroAprobacionAlzamientoActionPerformed(evt);
            }
        });

        btnBuscarNumeroAprobacionAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarNumeroAprobacionAlzamiento.setText("BUSCAR");
        btnBuscarNumeroAprobacionAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarNumeroAprobacionAlzamientoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlCDPLayout = new javax.swing.GroupLayout(pnlCDP);
        pnlCDP.setLayout(pnlCDPLayout);
        pnlCDPLayout.setHorizontalGroup(
            pnlCDPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCDPLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlCDPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtNumeroAprobacionAlzamiento)
                    .addComponent(btnBuscarNumeroAprobacionAlzamiento, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlCDPLayout.setVerticalGroup(
            pnlCDPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCDPLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtNumeroAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnBuscarNumeroAprobacionAlzamiento))
        );

        buttonGroup1.add(chkCDPAprobacionAlzamiento);
        chkCDPAprobacionAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkCDPAprobacionAlzamiento.setText("CDP");
        chkCDPAprobacionAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkCDPAprobacionAlzamientoActionPerformed(evt);
            }
        });

        pnlDatosPersoGara1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel36.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel36.setText("RUT");

        jLabel37.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel37.setText("APELLIDO PATERNO");

        jLabel39.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel39.setText("APELLIDO MATERNO");

        jLabel40.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel40.setText("NOMBRE");

        txtNombreGarAprobarAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtNombreGarAprobarAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNombreGarAprobarAlzamiento.setEnabled(false);

        txtApellMateGarAprobacionAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtApellMateGarAprobacionAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellMateGarAprobacionAlzamiento.setEnabled(false);

        txtApellPatAprobacionAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtApellPatAprobacionAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellPatAprobacionAlzamiento.setEnabled(false);

        txtRutGarAprobAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtRutGarAprobAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRutGarAprobAlzamiento.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel37)
                    .addComponent(jLabel36))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRutGarAprobAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellPatAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 128, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(jLabel40))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtNombreGarAprobarAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellMateGarAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(196, 196, 196))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(txtRutGarAprobAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(txtNombreGarAprobarAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(txtApellPatAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(txtApellMateGarAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlDatosPersoGara1Layout = new javax.swing.GroupLayout(pnlDatosPersoGara1);
        pnlDatosPersoGara1.setLayout(pnlDatosPersoGara1Layout);
        pnlDatosPersoGara1Layout.setHorizontalGroup(
            pnlDatosPersoGara1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersoGara1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlDatosPersoGara1Layout.setVerticalGroup(
            pnlDatosPersoGara1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDatosPersoGara1Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        btnMenuAprobacionAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuAprobacionAlzamiento.setText("MENÚ PRINCIPAL");
        btnMenuAprobacionAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuAprobacionAlzamientoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlDatosPersoGara1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnMenuAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addGap(36, 36, 36)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(pnlHipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(chkHipAprobAlzamiento))
                                .addGap(32, 32, 32)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(chkAutoAprobacionAlzamiento)
                                    .addComponent(pnlAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(pnlWarra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(chkWarrantAprobacionAlzamiento))
                                .addGap(27, 27, 27)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(pnlCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(chkCDPAprobacionAlzamiento))))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(chkCDPAprobacionAlzamiento)
                        .addGap(23, 23, 23)
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(pnlCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(pnlWarra, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(chkAutoAprobacionAlzamiento)
                                .addComponent(chkWarrantAprobacionAlzamiento))
                            .addComponent(chkHipAprobAlzamiento))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(pnlAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(pnlHipo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addGap(19, 19, 19)
                .addComponent(pnlDatosPersoGara1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(60, 60, 60)
                .addComponent(btnMenuAprobacionAlzamiento)
                .addGap(198, 198, 198))
        );

        jTabbedPane1.addTab("INFO. GARANTE", jPanel10);

        pnlDescripGarantia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DESCRIPCIÓN GARANTIA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtOtroComentario.setColumns(20);
        txtOtroComentario.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtOtroComentario.setRows(5);
        txtOtroComentario.setToolTipText("");
        txtOtroComentario.setEnabled(false);
        jScrollPane3.setViewportView(txtOtroComentario);

        txtDescripcionAprobacionAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtDescripcionAprobacionAlzamiento.setColumns(20);
        txtDescripcionAprobacionAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtDescripcionAprobacionAlzamiento.setRows(5);
        txtDescripcionAprobacionAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtDescripcionAprobacionAlzamiento.setEnabled(false);
        jScrollPane4.setViewportView(txtDescripcionAprobacionAlzamiento);

        lblDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDescripcion.setText("DESCRIPCIÓN");

        javax.swing.GroupLayout pnlDescripGarantiaLayout = new javax.swing.GroupLayout(pnlDescripGarantia);
        pnlDescripGarantia.setLayout(pnlDescripGarantiaLayout);
        pnlDescripGarantiaLayout.setHorizontalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDescripGarantiaLayout.createSequentialGroup()
                .addGap(70, 70, 70)
                .addComponent(lblDescripcion)
                .addGap(18, 18, 18)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 623, Short.MAX_VALUE)
                    .addComponent(jScrollPane3))
                .addContainerGap())
        );
        pnlDescripGarantiaLayout.setVerticalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDescripGarantiaLayout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDescripcion)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(119, 119, 119))
        );

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 850, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel12Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 830, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 514, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel12Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(117, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab("DESCRIP. GARANTÍA", jPanel12);

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "CONFIRMACIÓN ALZAMIENTO GARANTÍA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel2.setText("SUCURSAL");

        jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel3.setText("TIPO GARANTÍA");

        jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel4.setText("MONEDA");

        jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel5.setText("FECHA EXTINCIÓN");

        jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel6.setText("FECHA ÚLT. TASACIÓN");

        txtFechUltTasacionAprobAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtFechUltTasacionAprobAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechUltTasacionAprobAlzamiento.setEnabled(false);

        txtFechExtAprobacionAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtFechExtAprobacionAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechExtAprobacionAlzamiento.setEnabled(false);

        txtMonedaAprobAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtMonedaAprobAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtMonedaAprobAlzamiento.setEnabled(false);

        txtTipoGtiaAprobacionAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtTipoGtiaAprobacionAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTipoGtiaAprobacionAlzamiento.setEnabled(false);

        txtSucursalAprobacionAlzamiento.setBackground(new java.awt.Color(255, 255, 102));
        txtSucursalAprobacionAlzamiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtSucursalAprobacionAlzamiento.setEnabled(false);

        jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel8.setText("IDENTIFICACIÓN DE LA GARANTIA");

        txtIdentificacionGrarantia.setBackground(new java.awt.Color(255, 255, 102));
        txtIdentificacionGrarantia.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtIdentificacionGrarantia.setEnabled(false);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel3)
                            .addComponent(jLabel2))
                        .addGap(56, 56, 56)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtTipoGtiaAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtSucursalAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel4))
                        .addGap(43, 43, 43)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtFechExtAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtMonedaAprobAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addGap(18, 18, 18)
                        .addComponent(txtIdentificacionGrarantia, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addGap(18, 18, 18)
                        .addComponent(txtFechUltTasacionAprobAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(164, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(txtMonedaAprobAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(txtFechExtAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(txtSucursalAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(txtTipoGtiaAprobacionAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(txtFechUltTasacionAprobAlzamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(txtIdentificacionGrarantia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(14, Short.MAX_VALUE))
        );

        jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel7.setText("FECHA ÚLT. TASACIÓN");

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel11Layout.createSequentialGroup()
                    .addGap(345, 345, 345)
                    .addComponent(jLabel7)
                    .addContainerGap(346, Short.MAX_VALUE)))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(45, Short.MAX_VALUE))
            .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel11Layout.createSequentialGroup()
                    .addGap(83, 83, 83)
                    .addComponent(jLabel7)
                    .addContainerGap(84, Short.MAX_VALUE)))
        );

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(301, 301, 301))
        );

        jTabbedPane1.addTab("ALZAMIENTO GARANTÍA", jPanel13);

        pnlDescripGarantia1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "COMENTARIO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtComentarioAprob.setColumns(20);
        txtComentarioAprob.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtComentarioAprob.setRows(5);
        txtComentarioAprob.setToolTipText("");
        jScrollPane5.setViewportView(txtComentarioAprob);

        javax.swing.GroupLayout pnlDescripGarantia1Layout = new javax.swing.GroupLayout(pnlDescripGarantia1);
        pnlDescripGarantia1.setLayout(pnlDescripGarantia1Layout);
        pnlDescripGarantia1Layout.setHorizontalGroup(
            pnlDescripGarantia1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDescripGarantia1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 767, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlDescripGarantia1Layout.setVerticalGroup(
            pnlDescripGarantia1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDescripGarantia1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(308, 308, 308))
        );

        btnMenu2AprobAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenu2AprobAlzamiento.setText("MENÚ PRINCIPAL ");
        btnMenu2AprobAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenu2AprobAlzamientoActionPerformed(evt);
            }
        });

        btnAprobacionFinalAprAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnAprobacionFinalAprAlzamiento.setText("APROBAR");
        btnAprobacionFinalAprAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAprobacionFinalAprAlzamientoActionPerformed(evt);
            }
        });

        btnRechazarAprobAlzamiento.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnRechazarAprobAlzamiento.setText("RECHAZAR");
        btnRechazarAprobAlzamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRechazarAprobAlzamientoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel14Layout.createSequentialGroup()
                .addGap(121, 121, 121)
                .addComponent(btnRechazarAprobAlzamiento)
                .addGap(170, 170, 170)
                .addComponent(btnAprobacionFinalAprAlzamiento)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnMenu2AprobAlzamiento)
                .addGap(54, 54, 54))
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(32, Short.MAX_VALUE))
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(pnlDescripGarantia1, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 78, Short.MAX_VALUE)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnMenu2AprobAlzamiento)
                    .addComponent(btnRechazarAprobAlzamiento)
                    .addComponent(btnAprobacionFinalAprAlzamiento))
                .addGap(19, 19, 19))
        );

        lblEstado.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblEstado)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(75, 75, 75)
                .addComponent(lblEstado)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 18, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 850, Short.MAX_VALUE)
            .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel7Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 814, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(26, Short.MAX_VALUE)))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 514, Short.MAX_VALUE)
            .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel7Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(151, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab("Si/No", jPanel7);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ÁREA IMPRESIÓN", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        tbSalidaImprimirID.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbSalidaImprimirID.setEnabled(false);
        jScrollPane1.setViewportView(tbSalidaImprimirID);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 798, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(21, 21, 21))
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE ID DE LA GARANTÍA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscrIDImprimir.setText("BUSCAR");
        btnBuscrIDImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscrIDImprimirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(42, 42, 42)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtBuscarIDImprimir)
                    .addComponent(btnBuscrIDImprimir, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE))
                .addContainerGap(44, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtBuscarIDImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscrIDImprimir)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnImprimirID.setText("IMPRIMIR");
        btnImprimirID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirIDActionPerformed(evt);
            }
        });

        btnMenuPrincipalID.setText("MENÚ PRINCIPAL");
        btnMenuPrincipalID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalIDActionPerformed(evt);
            }
        });

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "IDENTIFICACIÓN DE GARANTÍAS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        buttonGroup2.add(rbtRolSii);
        rbtRolSii.setText("ROL SII");
        rbtRolSii.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtRolSiiActionPerformed(evt);
            }
        });

        buttonGroup2.add(rbtPatente);
        rbtPatente.setText("PATENTE");

        buttonGroup2.add(rbtDun);
        rbtDun.setText("D.U.N. 14");

        buttonGroup2.add(rbtNumeroCdp);
        rbtNumeroCdp.setText("NÚMERO CDP");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(57, 57, 57)
                .addComponent(rbtRolSii)
                .addGap(34, 34, 34)
                .addComponent(rbtPatente)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE)
                .addComponent(rbtDun)
                .addGap(30, 30, 30)
                .addComponent(rbtNumeroCdp)
                .addGap(28, 28, 28))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtRolSii)
                    .addComponent(rbtPatente)
                    .addComponent(rbtDun)
                    .addComponent(rbtNumeroCdp))
                .addContainerGap(10, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(369, 369, 369)
                .addComponent(btnImprimirID, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnMenuPrincipalID, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(34, 34, 34))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(302, 302, 302)
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(162, 162, 162)
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(14, Short.MAX_VALUE)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnImprimirID)
                    .addComponent(btnMenuPrincipalID))
                .addContainerGap())
        );

        jTabbedPane1.addTab("IMPRIMIR", jPanel2);

        btnExportarAprobAlzamGtia.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnExportarAprobAlzamGtia.setText("EXPORTAR A EXCEL");
        btnExportarAprobAlzamGtia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExportarAprobAlzamGtiaActionPerformed(evt);
            }
        });

        jLabel1.setText("MENÚ PRINCIPAL\\APROBACIÓN ALZAMIENTO GARANTÍA");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane1)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblLogo)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(114, 114, 114)
                                .addComponent(lblIngresoGaraAuto)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(btnExportarAprobAlzamGtia))
                            .addGroup(layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel1)
                                .addGap(0, 0, Short.MAX_VALUE)))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblIngresoGaraAuto)
                    .addComponent(lblLogo)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(31, 31, 31)
                        .addComponent(btnExportarAprobAlzamGtia))
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 544, Short.MAX_VALUE)
                .addContainerGap())
        );

        setSize(new java.awt.Dimension(891, 689));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnMenuAprobacionAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuAprobacionAlzamientoActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        AprobacionAlzamientoGarantia.this.dispose();
    }//GEN-LAST:event_btnMenuAprobacionAlzamientoActionPerformed

    private void btnBuscarSIIAprobAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarSIIAprobAlzamientoActionPerformed
       try
       {
        this.txtPatenteAprobacionAlzamiento.setText("");
        this.txtDUNAprobacionAlzamiento.setText("");
        this.txtNumeroAprobacionAlzamiento.setText("");

        if (txtSIIAprobacionAlzamiento.getText().equals("")) 
            {
                javax.swing.JOptionPane.showMessageDialog(null, "Ingrese ROL SII");
                txtSIIAprobacionAlzamiento.setText("");
                limpiar();
            }
            else
            {
                casa = reg.buscarPorRol(txtSIIAprobacionAlzamiento.getText());
                 
                if (casa.getMotivo_alza() == null) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia no ha participado de un Alzamiento.");
                    MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                    venMenuPrincipal.setVisible(true);
                    AprobacionAlzamientoGarantia.this.dispose();
                }
                if (casa.getRol_sii_hipo().length() == 0) 
                {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO ENCONTRADA");
                    txtSIIAprobacionAlzamiento.setText("");
                    limpiar();
                }
                else
                {
                    txtRutGarAprobAlzamiento.setText(casa.getRut_gara_hipo());
                    txtApellPatAprobacionAlzamiento.setText(casa.getApell_paterno_hipo());
                    txtApellMateGarAprobacionAlzamiento.setText(casa.getApell_materno_hipo());
                    txtNombreGarAprobarAlzamiento.setText(casa.getNombre_hipo());
//                    txtFolioGarAprobacionAlzamiento.setText(String.valueOf(casa.getFolio_garantia_hipo()));
                    txtDescripcionAprobacionAlzamiento.setText(casa.getDescrip_hipo());
                    txtOtroComentario.setText(casa.getComent_hipo());
                    txtSucursalAprobacionAlzamiento.setText(casa.getSucursal_hipo());
                    txtTipoGtiaAprobacionAlzamiento.setText("Hipotecaria");
                    txtFechUltTasacionAprobAlzamiento.setText(casa.getFech_ult_tasa_hipo());
                    
                    //////FECHA VENCE==================
                     String fechaVence = new SimpleDateFormat("dd/MM/yyyy").format(casa.getFech_extincion_hipo().getTime());
                    txtFechExtAprobacionAlzamiento.setText(fechaVence);
                    //////==========================================
                    
                    txtMonedaAprobAlzamiento.setText(casa.getMoneda_hipo());
                    btnAprobacionFinalAprAlzamiento.setVisible(true);
                    btnRechazarAprobAlzamiento.setVisible(true);
                    txtIdentificacionGrarantia.setText(casa.getRol_sii_hipo());
                    if (casa.getEstado_alza().equals("Aprobada")) 
                    {
                        lblEstado.setText("ESTADO: " + casa.getEstado_alza().toUpperCase() + ".");
                        txtComentarioAprob.setText(casa.getComentario_apro_alza());
                        javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia ya fue alzada");
                        txtComentarioAprob.setEditable(false);
                        btnAprobacionFinalAprAlzamiento.setVisible(false);
                        btnRechazarAprobAlzamiento.setVisible(false);
                    }
                    if(casa.getEstado_alza().equals("Rechazada") && casa.getMotivo_alza().equalsIgnoreCase("nulo"))
                    {
                        lblEstado.setText("ESTADO: " + casa.getEstado_alza().toUpperCase() + ".");
                        txtComentarioAprob.setText(casa.getComentario_apro_alza());
                        javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia fue rechazada");
                    }
                }
            }        }
       catch(Exception e)
       {
           e.getMessage();
       }
    }//GEN-LAST:event_btnBuscarSIIAprobAlzamientoActionPerformed

    private void chkHipAprobAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkHipAprobAlzamientoActionPerformed
        if(this.chkHipAprobAlzamiento.isSelected())
        {
            pnlHipo.setVisible(true);
            pnlAuto.setVisible(false);
            pnlWarra.setVisible(false);
            pnlCDP.setVisible(false);
        }
        else
        {
            pnlHipo.setVisible(false);
        }
    }//GEN-LAST:event_chkHipAprobAlzamientoActionPerformed

    private void chkAutoAprobacionAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkAutoAprobacionAlzamientoActionPerformed
        if(this.chkAutoAprobacionAlzamiento.isSelected())
        {
            pnlAuto.setVisible(true);
            pnlWarra.setVisible(false);
            pnlCDP.setVisible(false);
            pnlHipo.setVisible(false);
        }
        else
        {
            pnlAuto.setVisible(false);
        }
    }//GEN-LAST:event_chkAutoAprobacionAlzamientoActionPerformed

    private void chkWarrantAprobacionAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkWarrantAprobacionAlzamientoActionPerformed
        if(this.chkWarrantAprobacionAlzamiento.isSelected())
        {
            pnlWarra.setVisible(true);
            pnlCDP.setVisible(false);
            pnlHipo.setVisible(false);
            pnlAuto.setVisible(false);
        }
        else
        {
            pnlWarra.setVisible(false);
        }
    }//GEN-LAST:event_chkWarrantAprobacionAlzamientoActionPerformed

    private void chkCDPAprobacionAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkCDPAprobacionAlzamientoActionPerformed
        if(this.chkCDPAprobacionAlzamiento.isSelected())
        {
            pnlCDP.setVisible(true);
            pnlHipo.setVisible(false);
            pnlAuto.setVisible(false);
            pnlWarra.setVisible(false);
        }
        else
        {
            pnlCDP.setVisible(false);
        }
    }//GEN-LAST:event_chkCDPAprobacionAlzamientoActionPerformed

    private void btnBuscarPatenteAprobAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarPatenteAprobAlzamientoActionPerformed
        try
        {
        this.txtSIIAprobacionAlzamiento.setText("");
        this.txtDUNAprobacionAlzamiento.setText("");
        this.txtNumeroAprobacionAlzamiento.setText("");
        
if (txtPatenteAprobacionAlzamiento.getText().equals("")) 
            {
                javax.swing.JOptionPane.showMessageDialog(null, "Ingrese Patente");
                txtPatenteAprobacionAlzamiento.setText("");
                limpiar();
            }
            else
            {
                auto = reg.buscarPorPatente(txtPatenteAprobacionAlzamiento.getText());
                
                if (auto.getMotivo_alza() == null) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia no ha participado de un Alzamiento.");
                    MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                    venMenuPrincipal.setVisible(true);
                    AprobacionAlzamientoGarantia.this.dispose();
                }
                if (auto.getPatente_auto().length() == 0) 
                {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO ENCONTRADA");
                    txtPatenteAprobacionAlzamiento.setText("");
                    limpiar();
                }
                
                else
                {
                    txtRutGarAprobAlzamiento.setText(auto.getRut_gara_auto());
                    txtApellPatAprobacionAlzamiento.setText(auto.getApell_paterno_auto());
                    txtApellMateGarAprobacionAlzamiento.setText(auto.getApell_materno_auto());
                    txtNombreGarAprobarAlzamiento.setText(auto.getNombre_auto());
//                    txtFolioGarAprobacionAlzamiento.setText(String.valueOf(auto.getFolio_garantia_auto()));
                    txtDescripcionAprobacionAlzamiento.setText(auto.getDescrip_auto());
                    txtOtroComentario.setText(auto.getComent_auto());
                    txtSucursalAprobacionAlzamiento.setText(auto.getSucursal_auto());
                    txtTipoGtiaAprobacionAlzamiento.setText("Automotriz");
                    txtFechUltTasacionAprobAlzamiento.setText(auto.getFecha_ult_tasa_auto());
                    String fechaVence = new SimpleDateFormat("dd/MM/yyyy").format(auto.getFech_extincion_auto().getTime());
                    txtFechExtAprobacionAlzamiento.setText(fechaVence);
                    txtMonedaAprobAlzamiento.setText(auto.getMoneda_auto());
                    txtIdentificacionGrarantia.setText(auto.getPatente_auto());
                    btnAprobacionFinalAprAlzamiento.setVisible(true);
                    btnRechazarAprobAlzamiento.setVisible(true);
                    if (auto.getEstado_alza().equals("Aprobada")) 
                    {
                        lblEstado.setText("ESTADO: " + auto.getEstado_alza().toUpperCase() + ".");
                        txtComentarioAprob.setText(auto.getComentario_apro_alza());
                        javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia ya fue alzada");
                        txtComentarioAprob.setEditable(false);
                        btnAprobacionFinalAprAlzamiento.setVisible(false);
                        btnRechazarAprobAlzamiento.setVisible(false);
                    }
                    if(auto.getEstado_alza().equals("Rechazada") && auto.getMotivo_alza().equalsIgnoreCase("nulo"))
                    {
                        lblEstado.setText("ESTADO: " + auto.getEstado_alza().toUpperCase() + ".");
                        txtComentarioAprob.setText(auto.getComentario_apro_alza());
                        javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia fue rechazada");
                    }
                }
            }
        }catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnBuscarPatenteAprobAlzamientoActionPerformed

    private void btnBuscarDUNAprobarAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarDUNAprobarAlzamientoActionPerformed
        try
        {
        this.txtSIIAprobacionAlzamiento.setText("");
        this.txtPatenteAprobacionAlzamiento.setText("");
        this.txtNumeroAprobacionAlzamiento.setText("");

        if (txtDUNAprobacionAlzamiento.getText().equals("")) 
            {
                javax.swing.JOptionPane.showMessageDialog(null, "Ingrese DUN");
                txtDUNAprobacionAlzamiento.setText("");
                limpiar();
            }
            else
            {
                warra = reg.buscarPorDUN(txtDUNAprobacionAlzamiento.getText());
               
                if (warra.getMotivo_alza() == null) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia no ha participado de un Alzamiento.");
                    MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                    venMenuPrincipal.setVisible(true);
                    AprobacionAlzamientoGarantia.this.dispose();
                }
                if (warra.getDun_warra().length() == 0) 
                {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO ENCONTRADA");
                    txtDUNAprobacionAlzamiento.setText("");
                    limpiar();
                }
                
                else
                {
                    txtRutGarAprobAlzamiento.setText(warra.getRut_garante_warra());
                    txtApellPatAprobacionAlzamiento.setText(warra.getApell_paterno_warra());
                    txtApellMateGarAprobacionAlzamiento.setText(warra.getApell_materno_warra());
                    txtNombreGarAprobarAlzamiento.setText(warra.getNombre_warra());
//                    txtFolioGarAprobacionAlzamiento.setText(String.valueOf(warra.getFolio_warra()));
                    txtDescripcionAprobacionAlzamiento.setText(warra.getDescrip_warra());
                    txtOtroComentario.setText(warra.getComent_warra());
                    txtSucursalAprobacionAlzamiento.setText(warra.getNom_sucursal_warra());
                    txtTipoGtiaAprobacionAlzamiento.setText("Warrant");
                    txtFechUltTasacionAprobAlzamiento.setText(warra.getFech_ult_tasa_warra());
                    String fechaVence = new SimpleDateFormat("dd/MM/yyyy").format(warra.getFech_exti_warra().getTime());
                    txtFechExtAprobacionAlzamiento.setText(fechaVence);
                    txtMonedaAprobAlzamiento.setText(warra.getNom_moneda_warra());
                    txtIdentificacionGrarantia.setText(warra.getDun_warra());
                    btnAprobacionFinalAprAlzamiento.setVisible(true);
                    btnRechazarAprobAlzamiento.setVisible(true);
                    if (warra.getEstado_alza().equals("Aprobada")) 
                    {
                        lblEstado.setText("ESTADO: " + warra.getEstado_alza().toUpperCase() + ".");
                        txtComentarioAprob.setText(warra.getComentario_apro_alza());
                        javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia ya fue alzada");
                        txtComentarioAprob.setEditable(false);
                        btnAprobacionFinalAprAlzamiento.setVisible(false);
                        btnRechazarAprobAlzamiento.setVisible(false);
                    }
                    if(warra.getEstado_alza().equals("Rechazada") && warra.getMotivo_alza().equalsIgnoreCase("nulo"))
                    {
                        lblEstado.setText("ESTADO: " + warra.getEstado_alza().toUpperCase() + ".");
                        txtComentarioAprob.setText(warra.getComentario_apro_alza());
                        javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia fue rechazada");
                    }
                }
            }
        }
        catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnBuscarDUNAprobarAlzamientoActionPerformed

    private void btnBuscarNumeroAprobacionAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarNumeroAprobacionAlzamientoActionPerformed
        try
        {
        this.txtSIIAprobacionAlzamiento.setText("");
        this.txtPatenteAprobacionAlzamiento.setText("");
        this.txtDUNAprobacionAlzamiento.setText("");

        if (txtNumeroAprobacionAlzamiento.getText().equals("")) 
            {
                javax.swing.JOptionPane.showMessageDialog(null, "Ingrese NUMERO CDP");
                txtNumeroAprobacionAlzamiento.setText("");
                limpiar();
            }
            else
            {
                cdp = reg.buscarPorNum(Integer.parseInt(txtNumeroAprobacionAlzamiento.getText()));
                
                if (cdp.getMotivo_alza() == null) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia no ha participado de un Alzamiento.");
                    MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                    venMenuPrincipal.setVisible(true);
                    AprobacionAlzamientoGarantia.this.dispose();
                }
                if (cdp.getNum_cdp() == 0) 
                {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia NO ENCONTRADA");
                    txtNumeroAprobacionAlzamiento.setText("");
                    limpiar(); 
                }
                
                else
                {
                    txtRutGarAprobAlzamiento.setText(cdp.getRut_gara_cdp());
                    txtApellPatAprobacionAlzamiento.setText(cdp.getApell_paterno_cdp());
                    txtApellMateGarAprobacionAlzamiento.setText(cdp.getApell_materno_cdp());
                    txtNombreGarAprobarAlzamiento.setText(cdp.getNombre_cdp());
//                    txtFolioGarAprobacionAlzamiento.setText(String.valueOf(cdp.getFolio_cdp()));
                    txtDescripcionAprobacionAlzamiento.setText(cdp.getDescrip_cdp());
                    txtOtroComentario.setText(cdp.getComent_cdp());
                    txtSucursalAprobacionAlzamiento.setText(cdp.getSucu_cdp());
                    txtTipoGtiaAprobacionAlzamiento.setText("Cdp");
                    txtFechUltTasacionAprobAlzamiento.setText(cdp.getFech_ult_tasa_cdp());
                    String fechaVen = (new SimpleDateFormat("dd/MM/yyyy").format(cdp.getFech_extin_cdp().getTime()));
                    txtFechExtAprobacionAlzamiento.setText(fechaVen);
                    txtMonedaAprobAlzamiento.setText(cdp.getNom_moneda_cdp());
                    txtIdentificacionGrarantia.setText(String.valueOf(cdp.getNum_cdp()));
                    btnAprobacionFinalAprAlzamiento.setVisible(true);
                    btnRechazarAprobAlzamiento.setVisible(true);
                    
                    if (cdp.getEstado_alza().equals("Aprobada")) 
                    {
                        lblEstado.setText("ESTADO: " + cdp.getEstado_alza().toUpperCase() + ".");
                        txtComentarioAprob.setText(cdp.getComentario_apro_alza());
                        javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia ya fue alzada");
                        txtComentarioAprob.setEditable(false);
                        btnAprobacionFinalAprAlzamiento.setVisible(false);
                        btnRechazarAprobAlzamiento.setVisible(false);
                    }
                    if(cdp.getEstado_alza().equals("Rechazada") && cdp.getMotivo_alza().equalsIgnoreCase("nulo"))
                    {
                        lblEstado.setText("ESTADO: " + cdp.getEstado_alza().toUpperCase() + ".");
                        txtComentarioAprob.setText(cdp.getComentario_apro_alza());
                        javax.swing.JOptionPane.showMessageDialog(null, "Esta garantia fue rechazada");
                    }
                }
            }
        }catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnBuscarNumeroAprobacionAlzamientoActionPerformed

    private void btnExportarAprobAlzamGtiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExportarAprobAlzamGtiaActionPerformed
       if(!this.txtSIIAprobacionAlzamiento.getText().equals("")){
        String rol = this.txtSIIAprobacionAlzamiento.getText().trim();
        reg.exportarGarantiaHipotecariaRol(rol);
        javax.swing.JOptionPane.showMessageDialog(this, "Exportación realizada con exito");
        File file = new File("C:/export_aprobacion_garantia_Hipotecaria.csv");
        try {
            Desktop.getDesktop().open(file);
        } catch (IOException ex) {
            Logger.getLogger(IngresoGarante.class.getName()).log(Level.SEVERE, null, ex);
        }
        }
       if(!this.txtPatenteAprobacionAlzamiento.getText().equals("")){
        String patente = this.txtPatenteAprobacionAlzamiento.getText().trim();
        reg.exportarGarantiaAutomotrizPatente(patente);
        javax.swing.JOptionPane.showMessageDialog(this, "Exportación realizada con exito");
        File file = new File("C:/export_aprobacion_garantia_Automotriz.csv");
        try {
            Desktop.getDesktop().open(file);
        } catch (IOException ex) {
            Logger.getLogger(IngresoGarante.class.getName()).log(Level.SEVERE, null, ex);
        }
        }
       if(!this.txtDUNAprobacionAlzamiento.getText().equals("")){
        String dun = this.txtDUNAprobacionAlzamiento.getText().trim();
        reg.exportarGarantiaWarraDun(dun);
        javax.swing.JOptionPane.showMessageDialog(this, "Exportación realizada con exito");
        File file = new File("C:/export_aprobacion_garantia_warrant.csv");
        try {
            Desktop.getDesktop().open(file);
        } catch (IOException ex) {
            Logger.getLogger(IngresoGarante.class.getName()).log(Level.SEVERE, null, ex);
        }
        }
        if(!this.txtNumeroAprobacionAlzamiento.getText().equals("")){
        int numero = Integer.parseInt(this.txtNumeroAprobacionAlzamiento.getText().trim());
        reg.exportarGarantiaCDPNumero(numero);
        javax.swing.JOptionPane.showMessageDialog(this, "Exportación realizada con exito");
        File file = new File("C:/export_aprobacion_garantia_CDP.csv");
        try {
            Desktop.getDesktop().open(file);
        } catch (IOException ex) {
            Logger.getLogger(IngresoGarante.class.getName()).log(Level.SEVERE, null, ex);
        }
        }
    }//GEN-LAST:event_btnExportarAprobAlzamGtiaActionPerformed

    private void txtDUNAprobacionAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtDUNAprobacionAlzamientoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtDUNAprobacionAlzamientoActionPerformed

    private void txtSIIAprobacionAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSIIAprobacionAlzamientoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtSIIAprobacionAlzamientoActionPerformed

    private void txtNumeroAprobacionAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNumeroAprobacionAlzamientoActionPerformed
       if (!this.txtNumeroAprobacionAlzamiento.getText().matches("[ 0-9]*")) // expresiones regulares para validar
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese solo números");
            this.txtNumeroAprobacionAlzamiento.setText("");
        }
    }//GEN-LAST:event_txtNumeroAprobacionAlzamientoActionPerformed

    private void btnRechazarAprobAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRechazarAprobAlzamientoActionPerformed
        String estado = "Rechazada";
        String comentario = txtComentarioAprob.getText();
        String pat = "";
        String rol = "";
        String nucdp = "";
        String dun = "";
        String tabla = "";
        int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Rechaza este Alzamiento?", "Aprobacion", JOptionPane.OK_CANCEL_OPTION);

        switch(txtTipoGtiaAprobacionAlzamiento.getText())
        {

            case "Hipotecaria":
            rol = "folio_garantia_hipo";
            tabla = "garantia_hipotecaria";
            if (respuesta == 0)
            {
                reg.AprobarAlzamientoHipotecaria(txtIdentificacionGrarantia.getText(), estado, comentario, tabla, rol, user);
                javax.swing.JOptionPane.showMessageDialog(null, "Alzamiento Rechazado");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                AprobacionAlzamientoGarantia.this.dispose();
            }
            break;
            case "Automotriz":
            pat = "folio_garantia_auto";
            tabla = "garantia_automotriz";
            if (respuesta == 0)
            {
                reg.AprobarAlzamientoAutomotriz(txtIdentificacionGrarantia.getText(), estado, comentario, tabla, pat, user);
                javax.swing.JOptionPane.showMessageDialog(null, "Alzamiento Rechazado");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                AprobacionAlzamientoGarantia.this.dispose();
            }
            break;

            case "Warrant":
            dun = "folio_warra";
            tabla = "garantia_warrant";
            if (respuesta == 0)
            {
                reg.AprobarAlzamientoWarrant(txtIdentificacionGrarantia.getText(), estado, comentario, tabla, dun, user);
                javax.swing.JOptionPane.showMessageDialog(null, "Alzamiento Rechazado");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                AprobacionAlzamientoGarantia.this.dispose();
            }
            break;
            case "Cdp":
            nucdp = "folio_cdp";
            tabla = "garantia_cdp";
            if (respuesta == 0)
            {
                reg.AprobarAlzamientoCDP(Integer.parseInt(txtIdentificacionGrarantia.getText()), estado, comentario, tabla, nucdp, user);
                javax.swing.JOptionPane.showMessageDialog(null, "Alzamiento Rechazado");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                AprobacionAlzamientoGarantia.this.dispose();
            }
            break;
        }

    }//GEN-LAST:event_btnRechazarAprobAlzamientoActionPerformed

    private void btnAprobacionFinalAprAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAprobacionFinalAprAlzamientoActionPerformed
        String estado = "Aprobada";
        String comentario = txtComentarioAprob.getText();
        String pat = "";
        String rolSii = "";
        String nucdp = "";
        String dun = "";
        String tabla = "";
        int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Aprueba este Alzamiento?", "Aprobacion", JOptionPane.OK_CANCEL_OPTION);

        switch(txtTipoGtiaAprobacionAlzamiento.getText())
        {

            case "Hipotecaria":
            rolSii = "rol_sii_hipo";
            tabla = "garantia_hipotecaria";
            if (respuesta == 0)
            {
                reg.AprobarAlzamientoHipotecaria(txtIdentificacionGrarantia.getText(), estado, comentario, tabla, rolSii, user);
                javax.swing.JOptionPane.showMessageDialog(null, "Alzamiento Aprobado");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                AprobacionAlzamientoGarantia.this.dispose();
            }
            break;

            case "Automotriz":
            pat = "patente_auto";
            tabla = "garantia_automotriz";
            if (respuesta == 0)
            {
                reg.AprobarAlzamientoAutomotriz(txtIdentificacionGrarantia.getText(), estado, comentario, tabla, pat, user);
                javax.swing.JOptionPane.showMessageDialog(null, "Alzamiento Aprobado");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                AprobacionAlzamientoGarantia.this.dispose();
            }
            break;

            case "Warrant":
            dun = "dun_warra";
            tabla = "garantia_warrant";
            if (respuesta == 0)
            {

                reg.AprobarAlzamientoWarrant(txtIdentificacionGrarantia.getText(), estado, comentario, tabla, dun, user);
                javax.swing.JOptionPane.showMessageDialog(null, "Alzamiento Aprobado");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                AprobacionAlzamientoGarantia.this.dispose();
            }
            break;

            case "Cdp":
            nucdp = "num_cdp";
            tabla = "garantia_cdp";
            if (respuesta == 0)
            {
                reg.AprobarAlzamientoCDP(Integer.parseInt(txtIdentificacionGrarantia.getText()), estado, comentario, tabla, nucdp, user);
                javax.swing.JOptionPane.showMessageDialog(null, "Alzamiento Aprobado");
                MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
                venMenuPrincipal.setVisible(true);
                AprobacionAlzamientoGarantia.this.dispose();
            }
            break;
        }

    }//GEN-LAST:event_btnAprobacionFinalAprAlzamientoActionPerformed

    private void btnMenu2AprobAlzamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenu2AprobAlzamientoActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        AprobacionAlzamientoGarantia.this.dispose();
    }//GEN-LAST:event_btnMenu2AprobAlzamientoActionPerformed

    private void btnBuscrIDImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscrIDImprimirActionPerformed
         
        String fechaImpresion = String.valueOf(Fechas.FechaSistema());
        if(this.rbtRolSii.isSelected())
         {
             
        try
        {
            DefaultTableModel modelo1 =(DefaultTableModel)this.tbSalidaImprimirID.getModel();      
             modelo1.setNumRows(0);
            ArrayList<garantiaHipotecariaDTO> salida = reg.ListarPorRolHipo(this.txtBuscarIDImprimir.getText().trim());
            if(salida.isEmpty())
            {
                 
                 this.txtBuscarIDImprimir.setText(null);
                DefaultTableModel modelo =(DefaultTableModel)this.tbSalidaImprimirID.getModel();      
                modelo.setNumRows(0);
                javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
               
            }else
            {
            DefaultTableModel modelo =(DefaultTableModel)this.tbSalidaImprimirID.getModel(); 
          
            modelo.setColumnCount(0);
                if(modelo.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ","Calle: ", "Garantía: ", "Número identificatorio Hipotecario: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal:  ",
                        "Cobertura: ","Superficie: ","Dirección (Crédito): ", "Registro CBR: ","Unidad Superficie: ",
                        "Fecha último débito: ","Moneda: ","Tipo construcción: ","Comuna: ","Estado contribución: ",
                        "Localidad Registro: ","Fecha última tasación: ","Tipo garantía: ","Grado preferencía: ",
                        "Metros. construidos: ","Años repertorios: ","A. Fojas: ","Fecha vencimiento: ","Fecha último Revaluo: ",
                        "Fecha último crédito: ","Estado de la garantía: ","Fecha Aprobado/Rechazado: ","Fecha de modificación: ",
                        "Fecha ingreso alzamiento: ",
                        "Fecha Aprobado/Rechazo alzamiento: ",
                        "Estado Aprobado/Rechazado alzamiento: ",
                        "Usuario: "  };
                    modelo.addColumn("Concepto", arr1);
                    
                    for(garantiaHipotecariaDTO x: salida)
                {
                    Object[] arr2 ={
                        x.getRut_gara_hipo(),
                        x.getNombre_hipo()  + "  " + x.getApell_materno_hipo() + "  " + x.getApell_materno_hipo(),
                        x.getCalle_hipo() + "  " + x.getNum_dire_hipo(),x.getNombre_garantia_hipo(),x.getRol_sii_hipo(),x.getFolio_garantia_hipo(),
                        x.getMonto_inicial(),x.getFech_crea_hipo(),x.getSucursal_hipo(),x.getCobertura_hipo(),x.getSuperficie_hipo(),
                        x.getDireccion_hipo()+"  "+x.getNum_hipo(),x.getRegistro_cbr_hipo(),x.getUni_superficie_hipo(),x.getFech_ult_debito_hipo(),
                        x.getMoneda_hipo(),x.getTipo_construccion_hipo(),x.getComuna_hipo(),x.getEstado_constrib_hipo(),
                        x.getLocalidad_reg_hipo(),x.getFech_ult_tasa_hipo(),x.getTipo_garantia_hipo(),x.getGrado_prefere_hipo(),
                        x.getMts_construidos_hipo(),x.getAnos_repertorio_hipo(),x.getA_fojas_hipo(),x.getFech_extincion_hipo(),x.getFech_ult_revaluo_hipo(),
                        x.getFech_ult_credito_hipo(),x.getEstado_hipo(),x.getFech_crea_hipo(),x.getFech_modifi_hipo(),fechaImpresion,fechaImpresion,
                        x.getEstado_alza(),x.getNombre_usuario()

                    };
                     
                    modelo.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," "," "
                                    ," "," "," "," "," "," "," "," "," "," "
                                    ," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "};
                    modelo.addColumn("Observaciones",arr3);
                    
                }
            }
        }catch(Exception e)
        {
            e.getMessage();
        }
         }
         else if(this.rbtPatente.isSelected())
         {
             
              try
         {
            DefaultTableModel modelo2 =(DefaultTableModel)this.tbSalidaImprimirID.getModel();      
             modelo2.setNumRows(0);
             ArrayList<garantiaAutomotrizDTO> salida = reg.ListarPorPatenteAuto(this.txtBuscarIDImprimir.getText().trim());
             if(salida.isEmpty())
             {
                
                 this.txtBuscarIDImprimir.setText(null);
                 DefaultTableModel model = (DefaultTableModel)this.tbSalidaImprimirID.getModel();
                 model.setNumRows(0);
                 javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
             }else
             {
                 
                 DefaultTableModel model = (DefaultTableModel)this.tbSalidaImprimirID.getModel();
                 model.setColumnCount(0);
                 
                 if(model.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ", "Calle: ", "Garantía: ", "Número identificatorio Automotriz: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal:  ",
                        "Dirección (Crédito): ","Marca: ","Número de Chasis: ","Fecha ultimo debito",
                        "Moneda: ","Año: ","Número de Motor: ","Fecha última Tasación: ","Tipo garantía: ",
                        "Modelo: ","Número Regsitro de Prenda: ","Fecha vencimiento: ","Fecha último revaluo: ",
                        "Fecha último crédito: ","Estado de la garantía: ","Fecha Aprobado/Rechazo: ","Fecha de modificación: ",
                        "Fecha ingreso alzamiento: ",
                        "Fecha Aprobado/Rechazo alzamiento: ",
                        "Estado Aprobado/Rechazado alzamiento: ","Usuario: " };
                    model.addColumn("Concepto", arr1);
                    
                    for(garantiaAutomotrizDTO a: salida)
                {
                    Object[] arr2 ={
                         a.getRut_gara_auto(),
                         a.getNombre_auto() + "  " + a.getApell_paterno_auto() + "  " + a.getApell_materno_auto(),
                         a.getCalle_auto() + "  " + a.getNum_auto(),
                         a.getNombre_garantia_auto(),
                         a.getPatente_auto(),
                         a.getFolio_garantia_auto(),
                         a.getMonto_inicial(),
                         a.getFech_crea_auto(),
                         a.getSucursal_auto(),
                         a.getDireccion_auto(),a.getMarca_auto(),a.getNum_chasis_auto(),a.getFech_ult_debito_auto(),
                         a.getMoneda_auto(),a.getAño_auto(),a.getNum_motor_auto(),a.getFecha_ult_tasa_auto(),
                         a.getTipo_garantia_auto(),a.getModelo_auto(),a.getNum_reg_prenda_auto(),a.getFech_extincion_auto(),
                         a.getFech_ult_reval_auto(),a.getFech_ult_reval_credito_auto(),
                         a.getEstado_auto(),
                         a.getFech_crea_auto(),
                         a.getFecha_modifi_auto(),
                         fechaImpresion,
                         fechaImpresion,
                         a.getEstado_alza(),
                         a.getNombre_usuario()
                    };
                     
                    model.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "," "," "," "};
                    model.addColumn("Observaciones",arr3);
                    
                }

             }
         }
         catch(Exception e)
         {
             e.getMessage();
         }
         }
         else if(this.rbtDun.isSelected())
         {
          try{
             DefaultTableModel modelo3 =(DefaultTableModel)this.tbSalidaImprimirID.getModel();      
             modelo3.setNumRows(0);
            ArrayList<garantiaWarrantsDTO> salida = reg.ListarPorDunWarra(this.txtBuscarIDImprimir.getText().trim());
            if(salida.isEmpty())
            {
                
                this.txtBuscarIDImprimir.setText(null);
                DefaultTableModel model = (DefaultTableModel)tbSalidaImprimirID.getModel();
                model.setNumRows(0);
                javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
            }
            else
            {
                
                DefaultTableModel model = (DefaultTableModel)tbSalidaImprimirID.getModel();
                model.setColumnCount(0);
                
                if(model.getColumnCount() < 1)
                {
                   
                    Object[] arr1 ={"Rut: ","Nombre: ", "Calle: ", "Garantía: ", "Número identificatorio Warrant: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal: ",
                        "Tipo producto: ","Fecha último debito: ", "Moneda: ","Fecha última Tasación: ",
                        "Tipo garantía: ","Ingreso de Producto: ","Fecha vencimiento: ","Fecha último revaluo: ",
                        "Fecha último crédito: ","Estado de la garantía: ","Fecha Aprobado/Rechazado: ","Fecha de modificación: ",
                        "Fecha ingreso alzamiento: ",
                        "Fecha Aprobado/Rechazo alzamiento: ",
                        "Estado Aprobado/Rechazado alzamiento: ",
                        "Usuario: " };
                    model.addColumn("Concepto", arr1);
                    
                    for(garantiaWarrantsDTO w: salida)
                {
                    Object[] arr2 ={
                    w.getRut_garante_warra(),
                    w.getNombre_warra() + "  " + w.getApell_paterno_warra() + "  " + w.getApell_materno_warra(),
                    w.getCalle_warra() + "  " + w.getNum_warra(),
                    w.getNom_garantia_warra(),
                    w.getDun_warra(),w.getFolio_warra(),w.getMonto_inicial(),w.getFech_crea_warra(),
                    w.getNom_sucursal_warra(),w.getTipo_prod_warra(),w.getFech_ult_deb_warra(),
                    w.getNom_moneda_warra(),w.getFech_ult_tasa_warra(),w.getTipo_gara_warra(),w.getIngre_prod_warra(),
                    w.getFech_exti_warra(),w.getFech_ult_reval_warra(),w.getFech_ult_cred_warra(),
                    w.getEstado_warra(),w.getFech_crea_warra(),w.getFech_modifi_warra(),
                    fechaImpresion,
                    fechaImpresion,
                    w.getEstado_alza(),
                    w.getNombre_usuario()
                    };
                     
                    model.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "};
                    model.addColumn("Observaciones",arr3);
                    
                }
                
               
            }
        }
        catch(Exception e)
        {
            e.getMessage();
        }
         }
         else if (this.rbtNumeroCdp.isSelected())
         {
              try
       {
           
             DefaultTableModel modelo4 =(DefaultTableModel)this.tbSalidaImprimirID.getModel();      
             modelo4.setNumRows(0);
           ArrayList<garantiaCdpOtrosDTO> salida = reg.ListarPorCdp(Integer.parseInt(this.txtBuscarIDImprimir.getText().trim()));
           if(salida.isEmpty())
           {
               
               this.txtBuscarIDImprimir.setText(null);
               DefaultTableModel modelo = (DefaultTableModel)this.tbSalidaImprimirID.getModel();
               modelo.setNumRows(0);
               javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           }
           else
           {
               
               DefaultTableModel modelo = (DefaultTableModel)this.tbSalidaImprimirID.getModel();
               modelo.setColumnCount(0);
               
               if(modelo.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ", "Calle: ", "Garantía: ", "Número identificatorio CDP: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal: ",
                        "Fecha último debito: ","Moneda: ","Fecha última tasación","Tipo garantía: ","Fecha vencimiento: ",
                        "Fecha último revaluo: ","Fecha último credito: ","Estado de la garantía: ","Fecha aprobado/Rechazado: ",
                        "Fecha de modificación: ",
                        "Fecha ingreso alzamiento: ",
                        "Fecha Aprobado/Rechazo alzamiento: ",
                        "Estado Aprobado/Rechazado alzamiento: ",
                        "Usuario: " };
                    modelo.addColumn("Concepto", arr1);
                    
                    for(garantiaCdpOtrosDTO c: salida)
                {
                    Object[] arr2 ={
                                   c.getRut_gara_cdp(),
                                   c.getNombre_cdp() + "  " + c.getApell_paterno_cdp() + "  " + c.getApell_materno_cdp(),
                                   c.getCalle_cdp() + "  " + c.getNumero_calle_cdp(),
                                   c.getNom_garantia_cdp(),
                                   c.getNum_cdp(),
                                   c.getFolio_cdp(),
                                   c.getMonto_inicial(),
                                   c.getFech_crea_cdp(),
                                   c.getSucu_cdp(),
                                   c.getFech_ult_deb_cdp(),
                                   c.getNom_moneda_cdp(),
                                   c.getFech_ult_tasa_cdp(),
                                   c.getTipo_garantia_cdp(),
                                   c.getFech_extin_cdp(),
                                   c.getFech_ult_reval_cdp(),
                                   c.getFech_ult_cred_cdp(),
                                   c.getEstado_cdp(),
                                   c.getFech_crea_cdp(),
                                   c.getFech_modif_cdp(),
                                   fechaImpresion,
                                   fechaImpresion,
                                   c.getEstado_alza(),
                                   c.getNombre_usuario()
                    };
                     
                    modelo.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "," "," "," "," "," "," "};
                    modelo.addColumn("Observaciones",arr3);
                    
                }
    
           }
       }
       catch(Exception e)
       {
           e.getMessage();
       }
         }
    }//GEN-LAST:event_btnBuscrIDImprimirActionPerformed

    private void btnImprimirIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirIDActionPerformed
        if(this.rbtRolSii.isSelected())
        {
        try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirID.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirID.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirID.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirID.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Aprobación Alzamiento Hipotecaria");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(Level.SEVERE, null, e);
        }
        }
        else if(this.rbtPatente.isSelected())
        {
        try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirID.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirID.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirID.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirID.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Aprobación Alzamiento Automotriz");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(Level.SEVERE, null, e);
        }
        }
        else if(this.rbtDun.isSelected())
        {
             try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirID.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirID.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirID.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirID.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Aprobación Alzamiento Warrant");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(Level.SEVERE, null, e);
        }
        }
        else if (this.rbtNumeroCdp.isSelected())
        {
             try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirID.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirID.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirID.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirID.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Aprobación Alzamiento CDP");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(Level.SEVERE, null, e);
        }
        }
    }//GEN-LAST:event_btnImprimirIDActionPerformed

    private void btnMenuPrincipalIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalIDActionPerformed
       MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        AprobacionAlzamientoGarantia.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalIDActionPerformed

    private void rbtRolSiiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtRolSiiActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_rbtRolSiiActionPerformed

    
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(AprobacionAlzamientoGarantia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new AprobacionAlzamientoGarantia().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAprobacionFinalAprAlzamiento;
    private javax.swing.JButton btnBuscarDUNAprobarAlzamiento;
    private javax.swing.JButton btnBuscarNumeroAprobacionAlzamiento;
    private javax.swing.JButton btnBuscarPatenteAprobAlzamiento;
    private javax.swing.JButton btnBuscarSIIAprobAlzamiento;
    private javax.swing.JButton btnBuscrIDImprimir;
    private javax.swing.JButton btnExportarAprobAlzamGtia;
    private javax.swing.JButton btnImprimirID;
    private javax.swing.JButton btnMenu2AprobAlzamiento;
    private javax.swing.JButton btnMenuAprobacionAlzamiento;
    private javax.swing.JButton btnMenuPrincipalID;
    private javax.swing.JButton btnRechazarAprobAlzamiento;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JCheckBox chkAutoAprobacionAlzamiento;
    private javax.swing.JCheckBox chkCDPAprobacionAlzamiento;
    private javax.swing.JCheckBox chkHipAprobAlzamiento;
    private javax.swing.JCheckBox chkWarrantAprobacionAlzamiento;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel lblDescripcion;
    private javax.swing.JLabel lblEstado;
    private javax.swing.JLabel lblIngresoGaraAuto;
    private javax.swing.JLabel lblLogo;
    private javax.swing.JPanel pnlAuto;
    private javax.swing.JPanel pnlCDP;
    private javax.swing.JPanel pnlDatosPersoGara1;
    private javax.swing.JPanel pnlDescripGarantia;
    private javax.swing.JPanel pnlDescripGarantia1;
    private javax.swing.JPanel pnlHipo;
    private javax.swing.JPanel pnlWarra;
    private javax.swing.JRadioButton rbtDun;
    private javax.swing.JRadioButton rbtNumeroCdp;
    private javax.swing.JRadioButton rbtPatente;
    private javax.swing.JRadioButton rbtRolSii;
    private javax.swing.JTable tbSalidaImprimirID;
    private javax.swing.JTextField txtApellMateGarAprobacionAlzamiento;
    private javax.swing.JTextField txtApellPatAprobacionAlzamiento;
    private javax.swing.JTextField txtBuscarIDImprimir;
    private javax.swing.JTextArea txtComentarioAprob;
    private javax.swing.JTextField txtDUNAprobacionAlzamiento;
    private javax.swing.JTextArea txtDescripcionAprobacionAlzamiento;
    private javax.swing.JTextField txtFechExtAprobacionAlzamiento;
    private javax.swing.JTextField txtFechUltTasacionAprobAlzamiento;
    private javax.swing.JTextField txtIdentificacionGrarantia;
    private javax.swing.JTextField txtMonedaAprobAlzamiento;
    private javax.swing.JTextField txtNombreGarAprobarAlzamiento;
    private javax.swing.JTextField txtNumeroAprobacionAlzamiento;
    private javax.swing.JTextArea txtOtroComentario;
    private javax.swing.JTextField txtPatenteAprobacionAlzamiento;
    private javax.swing.JTextField txtRutGarAprobAlzamiento;
    private javax.swing.JTextField txtSIIAprobacionAlzamiento;
    private javax.swing.JTextField txtSucursalAprobacionAlzamiento;
    private javax.swing.JTextField txtTipoGtiaAprobacionAlzamiento;
    // End of variables declaration//GEN-END:variables


    private void limpiar() {
                    txtRutGarAprobAlzamiento.setText(null);
                    txtApellPatAprobacionAlzamiento.setText(null);
                    txtApellMateGarAprobacionAlzamiento.setText(null);
                    txtNombreGarAprobarAlzamiento.setText(null);
//                    txtFolioGarAprobacionAlzamiento.setText(null);
                    txtDescripcionAprobacionAlzamiento.setText(null);
                    txtOtroComentario.setText(null);
                    txtSucursalAprobacionAlzamiento.setText(null);
                    txtTipoGtiaAprobacionAlzamiento.setText(null);
                    txtFechUltTasacionAprobAlzamiento.setText(null);
                    txtFechExtAprobacionAlzamiento.setText(null);
                    txtMonedaAprobAlzamiento.setText(null);
                    btnAprobacionFinalAprAlzamiento.setVisible(false);
                    btnRechazarAprobAlzamiento.setVisible(false);
                    txtIdentificacionGrarantia.setText(null);
    }
}
